package com.atguigu.gmall.payment.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author:lyd
 * @Date:2023/9/6 20:01
 * @Version:1.0
 * @Description
 **/
@Component
@ConfigurationProperties(prefix = "app.alipay")
@Data
public class AlipayProperties {

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    private String appId = "9021000126658074";

    // 商户私钥，您的PKCS8格式RSA2私钥
    private String merchantPrivateKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDJfmsmWQPs3CZOV55pGpgshl/393PwdypaMH0uHBnLGbM7BwOBM0pzp90XkQwXwjM+JXEgbNZsMGQVYlMG5EKaKPiAbNkyGbgLxTFvSW2uPBpIQtLvjz5UqRf9yQ/qYfrwaGOmoWG/ORnHUB2dNgrMoP+ReVyFKqGj7eWiBdOuSyHmJhII1guiMOr3TbHawfdRnuYg58fR7yY+Vm9U4gxAnV9mJyjMjwDbRCKtd553qmRlr+BlTVzR3Nvn9rpIK5ICboS/Eh64ddgi5+LR+JoX2yKBEFP5gRTWk/WgsNBDHPFE4LiU3lwEQGtJkWEFDxlAzD6GVLk9Ya5YFuNUg8/bAgMBAAECggEBAKhCKCoKtWtq35YWNtNgAOlVgPhprGiGqlhMG4yQrL1chb3p+nQ+p5Jy//55AlcotW/VBmXkXR5VPo5Y4CpmHHPteK6NtsXOklFJ5yEeeTfBOtVS8CBaRtudpMopx1+bWFi/Y0+3fg+YGD3HWiN5CIWegCwz4x3U3swskdC9+umUmgZm/5iP8EMPXglkDgf4/bduDP+il+AIsVlOQciJHTfvicBGGN6VCKn7LTSZ7q6kOVdh99ib8hCazUQN4UBW0p+F2vvh18sKKzQCqyBuQC86ud7GZ/yKSST+NeYBSi7YR+ojStXIYvlzN4SXmfxPljQr8AJG5tRWkcfwP7/R8hECgYEA8THCuFgkPnKk/Wq49mBtLgqlVIinNb/s90O9NjMpffmCoDOv1TFPxbZu8USl/CHNv4Ac6qbZ+NmHDlm/r8GPA8M3Xpz6gLo546WKJm6KrtELvSzpfDiSgTK9BbVkUf2IAslAjRgsNiKL7LMsz0QHdKXJaryC0P0/qeBDYsMZ3/MCgYEA1dzI/4h1ZfrwAOlayqSeOoTu1f/ITFc1bmoAVuIeKtU66aJ7BqnT+mTqCno6l6wOCDPvPLPzPD5xAmo5Pi+fnXZLOm0xzzokexsGr84D4D1Qj/zSPeqQEZLOYwFSIj2nzFG52KOMYX7wFt97e6bpRcUH3nxDVnxPebRaBHimsnkCgYB2eqwdI+cB6g0UExWyqSFYqZAXW11P8Ox1dgf/FNi/8g3xphIslqGKDJio2cDzfqNz+3m45qdSL4DBUuLvchRPk9iiGFiRXWlMYyfewxRK1ZN/pQ04oQ2Oe58Qq88Q24qxW6zi4kntecDkUAul8NP8v+eWD+3uvUhFqU1QuWf/cwKBgAOnoke7rUXw4+kgE80iwxF89Bf0Jxgm5WLdrOPPOXTB8B/OBww2GslMsDM9o4K0DglV2eDPsnh1GLlR12iYp8GpI9/7vb4s4DK6Y4LdonNSmO3dBDrKp2uldqF6hEzRgOyc+PAa22tPIAtEBng2ggYPN/M1bHEt7q3Fx0QMS80BAoGADTCA0ZEcRbcEFhK78+G8xdFeZXtdHgD5Qyzi/6LzyhiYBbcGmZ8Z8PA8r75msOSMbzqXtaakam3YtKeACDJcs6fYL6X25S4EU3EHqQDOna/3v52zEGOj6vORc4wJu25/DzzzqhGg9yP7Xv0CLipMQYhk9nO4qgxIBO/1nRz+mpk=";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    private String alipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvO1CCpWXReijsy2boH1TqJT70ty4d2V/ccnMy47FJZJPX92m7HjixrshBwhutJOG/kpU2SnQBNTqAYO8IuP01OOTrEuG0JsEYbnuhFirPlamMhMWtS79zt2YhT+QVLwFzFC4lDPlfhxwIJLh72/unluBXDEc67xiyoa+IQkPg942AKo+OxsST9KycdDg1981bkzQgUqY4HjMxuuIjzPmWGubIdOkul9P36+S57ZNbblgpaFjHPUk+vWtvKozZ5Lbwbzi1wepjd12gxBuXz7N2hBnKNqZOXD309oNxbHT/SC//1kqKyQlIkRr8QQLQuzF+xO4ekKhk8FbwAFMyr2vVQIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    private String notifyUrl = "http://工程公网访问地址/alipay.trade.page.pay-JAVA-UTF-8/notify_url.jsp";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    private String returnUrl = "http://localhost:8080/alipay_demo/return_url.jsp";

    // 签名方式
    private String signType = "RSA2";

    // 字符编码格式
    private String charset = "utf-8";

    // 支付宝网关
    //"https://openapi.alipay.com/gateway.do"; 生产环境调用的网关
    private String gatewayUrl =  "https://openapi-sandbox.dl.alipaydev.com/gateway.do" ;//沙箱环境测试的网关


}
